Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify semantics when port_redirect is unset #1740

Merged

Conversation

arkodg
Copy link
Contributor

@arkodg arkodg commented Feb 17, 2023

Relates to #1725

/kind documentation

@k8s-ci-robot k8s-ci-robot added kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 17, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @arkodg. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 17, 2023
@robscott
Copy link
Member

Thanks @arkodg! We definitely need to clarify the spec here. If we're not careful, we may end up breaking some implementations along the way, so need to make sure we get as much feedback as possible before merging. Adding a hold until we've had more implementers weigh in.

/cc @skriss @shaneutt @youngnick
/hold
/ok-to-test

@k8s-ci-robot k8s-ci-robot requested a review from skriss February 21, 2023 16:29
@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 21, 2023
@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 21, 2023
apis/v1beta1/httproute_types.go Outdated Show resolved Hide resolved
@arkodg
Copy link
Contributor Author

arkodg commented Feb 28, 2023

@shaneutt updated based on the guidance received by @youngnick yesterday

@arkodg
Copy link
Contributor Author

arkodg commented Feb 28, 2023

cross linking this slack thread where a user was unable to redirect correctly because the default port 443 was getting appended to the Location header.

@arkodg arkodg requested review from shaneutt and removed request for robscott, skriss and youngnick February 28, 2023 20:29
Signed-off-by: Arko Dasgupta <[email protected]>
@shaneutt shaneutt dismissed their stale review February 28, 2023 22:02

removing my block, I didn't intend to block.

@arkodg arkodg removed the request for review from shaneutt March 2, 2023 23:37
@arkodg arkodg requested review from youngnick and removed request for robscott March 2, 2023 23:37
Signed-off-by: Arko Dasgupta <[email protected]>
@shaneutt shaneutt added this to the v0.7.0 milestone Mar 8, 2023
@youngnick
Copy link
Contributor

/approved

/hold for other review though

Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/unhold
/lgtm

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 10, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 10, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arkodg, shaneutt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 10, 2023
@k8s-ci-robot k8s-ci-robot merged commit 227de07 into kubernetes-sigs:main Mar 10, 2023
@arkodg arkodg deleted the clarify-port-redirect-default branch March 10, 2023 16:39
Comment on lines +905 to +908
// When empty, the Gateway Listener port is used.
// In all cases, when the protocol is http and the port is port 80,
// then the port must be omitted. Similarly, when the protocol is
// https and the port is port 443, then the port must also be omitted.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing to me, when we say the "port must be omitted" who are we talking to? Is this a direction for users or implementers?

cc @arkodg @shaneutt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I change must to will so it caters to both parties ?

Copy link
Member

@robscott robscott Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what we're trying to say is the following:

If the port is not specified in the Redirect Filter, implementations should use the port from 
the listener for redirects _unless_ the Listener or Redirect Filter protocol is HTTP or HTTPS, 
in which case it should not specify a port in the redirect configuration.

I'm not actually sure that's what we're trying to say, and what I wrote above is still rather confusing, but maybe it's at least clear that the guidance is intended for implementers?

Copy link
Contributor Author

@arkodg arkodg Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest reading through this thread #1740 (comment) and sharing your feedback, we are saying ports 80 and 443 should never be appended to the Location header

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that overall idea makes sense, it's just not clear to me in the current variation of the spec, moving this to #1806 so we don't lose track of the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants